package com.karashi.busloca;

import java.io.IOException;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.util.Log;

@Deprecated
public class BusLocaHttpClient {

	public BusLocaHttpResponse httpGet(String query) {

		HttpClient httpClient = new DefaultHttpClient();

		// HttpGet httpGet = new HttpGet(
		// "http://loca.seibubus.co.jp/seibuloca/navi?VID=lsc&EID=nt&UKD=1&DSMK=120035&ASMK=120001");
		// HttpGet httpGet = new HttpGet("http://www.google.co.jp/");

		BusLocaHttpResponse busLocaHttpResponse = null;
		try {
			HttpResponse response = httpClient.execute(new HttpGet(query));
			busLocaHttpResponse = new BusLocaHttpResponse(response);

		} catch (IOException e) {
			Log.d("BusLocaActivity", "Error Execute");
			Log.d("BusLocaActivity", e.getMessage());
		}

		return busLocaHttpResponse;
	}
}